package com.hmy.finance.api.client;

import com.hmy.ccp.common.result.FeignResult;
import com.hmy.finance.api.bo.core.request.*;
import com.hmy.finance.api.bo.core.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 财务核心基础数据FeignClient
 *
 * @author songkf
 */
@FeignClient(name = "hmy-finance")
public interface FinancialCoreFeignClient {
    /**
     * 开始租赁
     *
     * @param request 请求
     * @return 结果
     */
    @PostMapping("/feign/finance/core/startRental")
    FeignResult<StartRentalResponse> startRental(@RequestBody StartRentalRequest request);

    /**
     * 结束租赁
     *
     * @param request 请求
     * @return 结果
     */
    @PostMapping("/feign/finance/core/terminationRental")
    FeignResult<TerminationRentalResponse> terminationRental(@RequestBody TerminationRentalRequest request);

    /**
     * 应收调整生成损益
     *
     * @param request 请求
     * @return 结果
     * @author songkf
     */
    @PostMapping("/feign/finance/core/receivableAdjustmentProfitLoss")
    FeignResult<BaseGenerateProfitLossResponse> receivableAdjustmentProfitLoss(@RequestBody ReceivableAdjustGenerateRequest request);

    /**
     * 索赔生成损益
     *
     * @param request 请求
     * @return 结果
     */
    @PostMapping("/feign/finance/core/claimGenerateProfitLoss")
    FeignResult<BaseGenerateProfitLossResponse> claimGenerateProfitLoss(@RequestBody ClaimGenerateRequest request);

    /**
     * 报停生成损益
     *
     * @param request 请求
     * @return 结果
     */
    @PostMapping("/feign/finance/core/pauseGenerateProfitLoss")
    FeignResult<BaseGenerateProfitLossResponse> pauseGenerateProfitLoss(@RequestBody PauseGenerateRequest request);

    /**
     * 查询设备租赁记录剩余暂停天数
     *
     * @param request 请求参数
     * @return 剩余暂停天数响应
     * @author songkf
     */
    @PostMapping("/feign/finance/core/queryDeviceRentalRecordRemainingPauseDay")
    FeignResult<QueryDeviceRentalRecordRemainingPauseDayResponse> queryDeviceRentalRecordRemainingPauseDay(@RequestBody QueryDeviceRentalRecordRemainingPauseDayRequest request);

    /**
     * 合同退场停止流水和冲抵
     *
     * @param request 请求
     * @return 结果
     */
    @PostMapping("/feign/finance/core/contractTerminationStopFlowAndOffset")
    FeignResult<ContractTerminationStopFlowAndOffsetResponse> contractTerminationStopFlowAndOffset(@RequestBody ContractTerminationStopFlowAndOffsetRequest request);

    /**
     * 合同取消停止流水和冲抵
     *
     * @param request 请求
     * @return 结果
     */
    @PostMapping("/feign/finance/core/contractCancelStopFlowAndOffset")
    FeignResult<ContractCancelStopFlowAndOffsetResponse> contractCancelStopFlowAndOffset(@RequestBody ContractCancelStopFlowAndOffsetRequest request);

    /**
     * 计算补录报停费用
     *
     * @param request 请求
     * @return 结果
     * @author songkf
     */
    @PostMapping("/feign/finance/core/calculateSupplementaryPauseDeviceFee")
    FeignResult<SupplementaryPauseAmountCalculateResponse> calculateSupplementaryPauseDeviceFee(@RequestBody SupplementaryPauseAmountCalculateRequest request);

    /**
     * 生成补录报停损益
     *
     * @param request 请求
     * @return 结果
     * @author songkf
     */
    @PostMapping("/feign/finance/core/generateSupplementaryPause")
    FeignResult<SupplementaryPauseGenerateResponse> generateSupplementaryPause(@RequestBody SupplementaryPauseGenerateRequest request);
}
